import { newRequest } from '@/utils/newRequest'
import request from '@/utils/request'

export function GetAutoProductionPlanList(data) {
  return newRequest({
    url: '/GetAutoProductionPlanList',
    method: 'post',
    data
  })
}

//提交排产规则设置
export function commitOrderAutoPlan(data) {
  return newRequest({
    url: '/api/Plan/CommitOrderAutoPlan',
    method: 'post',
    data: {
      ...data
    }
  })
}

//  获取用户可以选择的
export function GetUnSureLineAndModel(params) {
  return request({
    url: '/GetUnSureLineAndModel',
    method: 'get',
    params
  })
}

//拼版模板查询
// export function getBoardModelList(params) {
//     return newRequest({
//         url: '/api/Plan/GetBoardModelList',
//         method: 'get',
//         params: {
//             ...params
//         }
//     })
// }
export function GetBoardModel(data) {
  return newRequest({
    url: '/api/BoardModel/GetBoardModel',
    method: 'post',
    data
  })
}

//删除排产规则设置
export function removeOrderAutoPlan(data) {
  return newRequest({
    url: '/api/Plan/RemoveOrderAutoPlan',
    method: 'post',
    data: {
      ...data
    }
  })
}

// 获取订单排产列表
export function getOrderUnPlanPageList(params) {
  return newRequest({
    url: '/api/Plan/GetOrderUnPlanPageList',
    method: 'get',
    params: {
      ...params
    }
  })
}

/*
* 修改排程规则
* */
export function ModefyAutoProductionPlan(data) {
  return newRequest({
    url: '/ModefyAutoProductionPlan',
    method: 'post',
    data
  })
}

/*
* 新增排程规则
* */
export function AddAutoProductionPlan(data) {
  return newRequest({
    url: '/AddAutoProductionPlan',
    method: 'post',
    data
  })
}
